// package com->alibaba->druid->sql->ast;

// import com->alibaba->druid->sql->visitor->SQLASTVisitor*;
#pragma once

#include <string>
#include <list>

#include "SQLObjectImpl.h"
#include "../../utils/enumdecl.h"
class SQLASTVisitor;

// 声明一个枚举
class SQLAnnIndex_IndexType
{
public:
  static SQLAnnIndex_IndexType Flat;
  static SQLAnnIndex_IndexType FastIndex;

  uint64_t mask;
  string_ptr  name;

  SQLAnnIndex_IndexType(int mask, string_ptr  name);
  static uint64_t of(string_ptr  type);
};

class SQLAnnIndex_Distance
{
public:
  static SQLAnnIndex_Distance Hamming;
  static SQLAnnIndex_Distance SquaredEuclidean;
  static SQLAnnIndex_Distance DotProduct;

  int mask;
  string_ptr  name;

  SQLAnnIndex_Distance(int mask, string_ptr  name);
  uint64_t of(string_ptr  type);
};

class SQLAnnIndex : virtual public SQLObjectImpl
{
public:
  int indexType;
  int rtIndexType;
  SQLAnnIndex_Distance *distance;

  SHAREDOBJECT(SQLAnnIndex)   ;
  // SQLAnnIndex *clone();
  virtual SQLObject_ptr  clone();
  void accept0(SQLASTVisitor_ptr  v) ;

  void setIndexType(string_ptr  type);

  void setIndexType(SQLAnnIndex_IndexType *indexType, BOOL_ptr state);

  void setRtIndexType(SQLAnnIndex_IndexType *indexType, BOOL_ptr state);

  void setRtIndexType(string_ptr  type);

  int getIndexType();

  int getRtIndexType();

  SQLAnnIndex_Distance *getDistance();

  void setDistance(SQLAnnIndex_Distance *distance);

  void setDistance(string_ptr  distance);

protected:
};
